import request from '@/config/axios'

// 用户反馈 VO
export interface UserUsedFeedbackVO {
  id: number // 主键
  userId: number // 用户id
  content: string // 反馈内容
  picUrl: string // 图片地址
  picId: number // 图片的id
}

// 用户反馈 API
export const UserUsedFeedbackApi = {
  // 查询用户反馈分页
  getUserUsedFeedbackPage: async (params: any) => {
    return await request.get({ url: `/member/user-used-feedback/page`, params })
  },

  // 查询用户反馈详情
  getUserUsedFeedback: async (id: number) => {
    return await request.get({ url: `/member/user-used-feedback/get?id=` + id })
  },

  // 新增用户反馈
  createUserUsedFeedback: async (data: UserUsedFeedbackVO) => {
    return await request.post({ url: `/member/user-used-feedback/create`, data })
  },

  // 修改用户反馈
  updateUserUsedFeedback: async (data: UserUsedFeedbackVO) => {
    return await request.put({ url: `/member/user-used-feedback/update`, data })
  },

  // 删除用户反馈
  deleteUserUsedFeedback: async (id: number) => {
    return await request.delete({ url: `/member/user-used-feedback/delete?id=` + id })
  },

  // 导出用户反馈 Excel
  exportUserUsedFeedback: async (params) => {
    return await request.download({ url: `/member/user-used-feedback/export-excel`, params })
  }
}